package com.feng.zhihao.apigeteway.controller;

import org.apache.shiro.SecurityUtils;

import com.feng.zhihao.apigeteway.entity.UserInfo;

public class BaseController {
	public UserInfo getCurrentUser(){
		org.apache.shiro.subject.Subject currentUser = SecurityUtils.getSubject();
		return (UserInfo) currentUser.getPrincipal();
	}
}
